package com.sugar.domain.oa.hr;

import java.util.Date;
import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * @标题：组织机构实体
 * @描述：
 * @编写者：杨浩泉
 * @日期：2011-5-9 <b>下午02:56:14</b>
 */
@Entity@Table(name="sugar_organization")
public class Organization {
	
	/** 机构代码，指单位的组织机构代码，9位数 */
	private String orgCode ;
	
	/** 机构法定人 */
	private String orgLegalPeople ;
	
	/** 机构法定名称 */
	private String orgLegalName ;
	
	/** 机构行政代表电话 */
	private String orgAdminTel ;
	
	/** 机构成立地国 */
	private String establishCountry;
	
	/** 机构成立日期 */
	private String establishTime;
	
	/** 机构邮编 */
	private String orgZip ;
	
	/** 机构所在地址 */
	private String orgAddr ;
	
	/** 机构简介 */
	private String orgSynopsis ;
	
	/** 机构添加时间 */
	private Date addTime = new Date() ;

	/** 机构与部门 一对多关联关系 **/
	private Set<Department> dept ;
	
	@OneToMany(mappedBy="org")
	@JoinColumn(name="od_id")
	public Set<Department> getDept() {
		return dept;
	}

	public void setDept(Set<Department> dept) {
		this.dept = dept;
	}

	@Id
	public String getOrgCode() {
		return orgCode;
	}

	public void setOrgCode(String orgCode) {
		this.orgCode = orgCode;
	}

	public String getOrgLegalPeople() {
		return orgLegalPeople;
	}

	public void setOrgLegalPeople(String orgLegalPeople) {
		this.orgLegalPeople = orgLegalPeople;
	}

	public String getOrgLegalName() {
		return orgLegalName;
	}

	public void setOrgLegalName(String orgLegalName) {
		this.orgLegalName = orgLegalName;
	}

	public String getOrgAdminTel() {
		return orgAdminTel;
	}

	public void setOrgAdminTel(String orgAdminTel) {
		this.orgAdminTel = orgAdminTel;
	}

	public String getEstablishCountry() {
		return establishCountry;
	}

	public void setEstablishCountry(String establishCountry) {
		this.establishCountry = establishCountry;
	}

	public String getEstablishTime() {
		return establishTime;
	}

	public void setEstablishTime(String establishTime) {
		this.establishTime = establishTime;
	}

	public String getOrgZip() {
		return orgZip;
	}

	public void setOrgZip(String orgZip) {
		this.orgZip = orgZip;
	}

	public String getOrgAddr() {
		return orgAddr;
	}

	public void setOrgAddr(String orgAddr) {
		this.orgAddr = orgAddr;
	}

	public String getOrgSynopsis() {
		return orgSynopsis;
	}

	public void setOrgSynopsis(String orgSynopsis) {
		this.orgSynopsis = orgSynopsis;
	}

	@Temporal(TemporalType.DATE)
	public Date getAddTime() {
		return addTime;
	}

	public void setAddTime(Date addTime) {
		this.addTime = addTime;
	}

	
}
